package com.xoa.dao.WFE;

import com.xoa.dao.base.BaseMapper;
import com.xoa.model.workflow.FlowDetailInfo;
import com.xoa.model.workflow.FlowTypeModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface WFEFlowTypeModelMapper extends BaseMapper<FlowTypeModel> {

    List<FlowTypeModel> selectBySortid(@Param("flowId") Integer flowId);

    List<FlowTypeModel> selectBySearch(@Param("searchValue") String searchValue, @Param("sortId") Integer sortId);

    List<FlowTypeModel> selectFlowAuthOrSearch(Map<String, Object> map);

    FlowDetailInfo selectFlowDetailInfo(@Param("flowId") Integer flowId);

    /**
     * 创建作者:   张勇
     * 创建日期:   2017/6/22 10:53
     * 方法介绍:   根据flowId 和 formId 查询一条数据
     * 参数说明:
     *
     * @return
     */
    public FlowTypeModel selectOnlyType(@Param("flowId") Integer flowId, @Param("formId") Integer formId);

    public FlowTypeModel queryOneObject(@Param("flowId") Integer flowId);

    /**
     * 创建作者:   张勇
     * 创建日期:   2017/7/7 10:44
     * 方法介绍:   查询说明和附件
     * 参数说明:   流程ID和表单ID
     *
     * @return
     */
    public FlowTypeModel selectAttachmentAndInstructions(@Param("flowId") Integer flowId, @Param("formId") Integer formId);

    public FlowTypeModel sflowType(Integer runId);

      int updateFlowTypeModel(FlowTypeModel flowTypeModel);

    /**
     * 创建作者:   张航宁
     * 创建日期:   2017/7/18
     * 方法介绍:   根据菜单的父类id查询流程信息
     *
     * @return
     */
    public List<FlowTypeModel> getDataBySortParent(@Param(value = "sortParent") Integer sortParent);

    List<FlowTypeModel> selectFlowAuthOrSearchByCodeId(Map<String, Object> param);

    List<FlowDetailInfo> selectDocumentFloeType();

    int deleteByFlowId(Integer flowId);

    List<Integer> getAFlowId(Map<String, Object> map);

//    int deleteByPrimaryKey(Integer flowId);

//    int insert(FlowTypeModelWithBLOBs record);
//
//    int insertSelective(FlowTypeModelWithBLOBs record);
//
//    FlowTypeModelWithBLOBs selectByPrimaryKey(Integer flowId);
//
//    int updateByPrimaryKeySelective(FlowTypeModelWithBLOBs record);
//
//    int updateByPrimaryKeyWithBLOBs(FlowTypeModelWithBLOBs record);
//
//    int updateByPrimaryKey(FlowTypeModel record);
}